// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.common.model.PageSearch;
import com.fowo.api.entity.InventoryReport;
import com.fowo.api.model.inventory.report.InventoryReportDetailedCostParams;
import com.fowo.api.model.inventory.report.InventoryReportDetailedCostResult;
import com.fowo.api.model.inventory.report.InventoryReportDetailedQtyParams;
import com.fowo.api.model.inventory.report.InventoryReportDetailedQtyResult;
import com.fowo.api.model.inventory.report.InventoryReportItemVo;
import com.fowo.api.model.inventory.report.InventoryReportLocalRepositoryParams;
import com.fowo.api.model.inventory.report.InventoryReportLocalRepositoryResult;
import com.fowo.api.model.inventory.report.InventoryReportLocalWarehouseCostsParams;
import com.fowo.api.model.inventory.report.InventoryReportLocalWarehouseCostsResult;
import com.fowo.api.model.inventory.report.InventoryReportSearchParamPo;
import com.fowo.api.model.inventory.report.InventoryReportVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface InventoryReportMapper extends BaseMapper<InventoryReport> {
  Page<InventoryReportItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") InventoryReportSearchParamPo search
  );
  List<OptionItem<InventoryReportItemVo>> searchOptions(
    @Param("search") InventoryReportSearchParamPo search
  );
  List<InventoryReportItemVo> search(
    @Param("search") InventoryReportSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") InventoryReportSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") InventoryReportSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") InventoryReportSearchParamPo search);
  Long getIdByBatchNo(@Param("batchNo") String batchNo);

  List<Long> getIdsByBatchNo(@Param("list") List<String> list);

  String getBatchNoById(@Param("id") Long id);

  List<Map<String, Object>> getBatchNoByIds(@Param("ids") List<Long> ids);
  InventoryReportVo selectVoById(@Param("id") Long id);
  /**
   * 明细成本 总数
   */
  int DetailedCostTotal(
    @Param("params") InventoryReportDetailedCostParams params
  );
  /**
   * 明细成本（分页）
   */
  Page<InventoryReportDetailedCostResult> detailedCostPage(
    @Param("page") Page page,
    @Param("params") InventoryReportDetailedCostParams params
  );

  /**
   * 明细成本合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map detailedCostSummary(
    @Param("params") InventoryReportDetailedCostParams params
  );

  /**
   * 查询店铺下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> detailedCostshopId();

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> detailedCoststockId();

  /**
   * 本地仓库 总数
   */
  int LocalRepositoryTotal(
    @Param("params") InventoryReportLocalRepositoryParams params
  );
  /**
   * 本地仓库（分页）
   */
  Page<InventoryReportLocalRepositoryResult> localRepositoryPage(
    @Param("page") Page page,
    @Param("params") InventoryReportLocalRepositoryParams params
  );

  /**
   * 本地仓库合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map localRepositorySummary(
    @Param("params") InventoryReportLocalRepositoryParams params
  );

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> localRepositorywarehouseId();

  /**
   * 明细数量 总数
   */
  int DetailedQtyTotal(
    @Param("params") InventoryReportDetailedQtyParams params
  );
  /**
   * 明细数量（分页）
   */
  Page<InventoryReportDetailedQtyResult> detailedQtyPage(
    @Param("page") Page page,
    @Param("params") InventoryReportDetailedQtyParams params
  );

  /**
   * 明细数量合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map detailedQtySummary(
    @Param("params") InventoryReportDetailedQtyParams params
  );

  /**
   * 查询店铺下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> detailedQtyshopId();

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> detailedQtystockId();

  /**
   * 本地仓库成本 总数
   */
  int LocalWarehouseCostsTotal(
    @Param("params") InventoryReportLocalWarehouseCostsParams params
  );
  /**
   * 本地仓库成本（分页）
   */
  Page<InventoryReportLocalWarehouseCostsResult> localWarehouseCostsPage(
    @Param("page") Page page,
    @Param("params") InventoryReportLocalWarehouseCostsParams params
  );

  /**
   * 本地仓库成本合计
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  Map localWarehouseCostsSummary(
    @Param("params") InventoryReportLocalWarehouseCostsParams params
  );

  /**
   * 查询仓库下拉框
   */
  @SuppressWarnings("MybatisXMapperMethodInspection")
  List<Map> localWarehouseCostswarehouseId();
}
